package com.asialjim.wechat.wechataccount;

import com.asialjim.wechat.core.bean.WeChatBean;
import com.asialjim.wechat.pojo.account.WeChatAccount;
import java.util.List;

/**
 * <h1><em>ASIAL JIM JAVA DOC</em></h1><hr/>
 * <h2>CLASS DESCRIPTION <i>[ NAME: WeChatAccountService ]</i></h2><strong>
 * <p> we-chat account service
 * </strong><p><p><em>Copyright &copy; Asial Jim Co., LTD</em><hr/>
 *
 * @author Asial Jim &nbsp;&nbsp; <span>Email:<a href="mailto:asialjim@hotmail.com">asialjim@hotmail.com</a> &nbsp;&nbsp; <a href="asialjim@qq.com">asialjim@qq.com</a></span>
 * @version 1.0.0
 * @since 2021/3/11   &nbsp;&nbsp; JDK 8
 */

public interface WeChatAccountService extends WeChatBean {

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: allAccounts ]</i></h3>
     * 获取所有微信公众平台应用账号
     * <p>get all of we-chat application account</p>
     * @return {@link List< WeChatAccount> accounts}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/23 9:53
     */
    List<WeChatAccount> allAccounts();

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: account ]</i></h3>
     * 通过公众平台appid编号查询公众号账户
     * @param accountId {@link String appid}
     * @return {@link WeChatAccount we chat account}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/23 9:54
     */
    WeChatAccount account(String accountId);

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: deCacheAllAccount ]</i></h3>
     * 清除缓存
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/23 9:55
     */
    void deCacheAllAccount();

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: findBySubjectId ]</i></h3>
     * 通过微信公众平台应用微信账号获取应用账号
     * @param subjectId {@link String user id for we-chat public application}
     * @return {@link WeChatAccount we chat account}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/23 9:56
     */
    WeChatAccount findBySubjectId(String subjectId);

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: update ]</i></h3>
     * 修改公众平台应用账号
     * @param account {@link WeChatAccount we chat account}
     * @return {@link Boolean success update}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/23 9:59
     */
    boolean update(WeChatAccount account);

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: add ]</i></h3>
     * 添加公众平台应用账号
     * @param account {@link WeChatAccount we chat account}
     * @return {@link Boolean success add}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/23 10:00
     */
    boolean add(WeChatAccount account);

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: delete ]</i></h3>
     * 删除公众平台应用账号
     * @param accountId {@link String account app id}
     * @return {@link Boolean success delete}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/23 10:01
     */
    boolean delete(String accountId);

    String currentAppId();
}